<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>欢迎访问产品运营互动中心！</title>
<%@ include file="/commons/include/head-meta.inc.jsp"%>
<script type="text/javascript">
	var count=1;
	function addone(){
		var divId="newDivId-"+count;
		var btnTemplate='&nbsp;&nbsp;<input type="button" value="删除" onClick="deleteDive(this);">';
		var thtml=$('#templaeId').html();
		thtml=thtml.replace("startPersonId","newPersonId-"+count);
		thtml=thtml.replace("startPersonId","newPersonId-"+count);
		thtml=thtml.replace("prodPersonId","newProdPersonId-"+count);
		thtml=thtml.replace("prodPersonId","newProdPersonId-"+count);
		var finalHtml='<div id='+divId+'><br/>'+btnTemplate+thtml+'</div>';
		
		$('#newReqId').append(finalHtml);
		count++;
		f_iframeResize();
	}
	
	function deleteDive(obj){
		$(obj.parentNode).remove();
		f_iframeResize();
	}
	
	
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<s:form action="doDemand_resolve.action" id="form1" name="form1" namespace="/bpm" method="post" >
<table width="980" border="0" cellspacing="0" cellpadding="0" align="center">
		<tr>
			<td>
			<table width="100%" border="0" cellpadding="0" cellspacing="0"
				background="<s:url value="/images/new/gxzl_index_2.gif"/>">
				<tr>
					<td width="20" height="32">&nbsp;</td>
					<td width="20"><img
						src="<s:url value="/images/new/dq_dot.gif"/>" width="15"
						height="12" /></td>
					<td>当前位置：分解需求单</td>
				</tr>
			</table>
			</td>
		</tr>
	<tr>
		<td background="<s:url value="/images/home_4a.gif"/>" class="leftbg">
		<table width="98%" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">	
			<tr>
				<td width="20%" valign="top">
				<table width="100%" height="400"  border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF">
					<tr>
						<td valign="top" align="center">
					<TABLE width="98%" cellSpacing=1 cellPadding=0
						align="center">
						<TR height=30>
							<TD align=left width="10%">
								<input type="button" name="Submit" value="提 交" onclick="subValidateForm('doDemand_resolve.action');">
								<input type="button" value="添 加" onClick="addone();">			
								<input type="button" value="返 回" onClick="location.href='flowReq_searchProdAdvReqFJList.action'">
								<input type="hidden" name="businessReqId" value="${businessRequest.id }">
							</TD>
						</TR>
					</table>
					<table width="98%" border="0" cellspacing="0" cellpadding="0">
						<tr>
							<td height="5">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab1.gif"/>" width="5" height="5" /></td>
										<td class="tdborderup"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
										<td width="5"><img src="<s:url value="/images/cphdzx_tab2.gif"/>" width="5" height="5" /></td>
									</tr>
								</table>
							</td>
						</tr>
						<tr>
							<td  class="tdborderleftright">
							
								&nbsp;&nbsp;&nbsp;待分解需求单号：${businessRequest.reqCode}
								<div id="templaeId">
								<table width="98%" border="0" cellspacing="0"
									cellpadding="7" align="center" class=tablecolor2>
	
									<tr>
										<td bgcolor="D6E3FA">
											<div align="right" class="STYLE2">
												<font color="red">*</font>需求名称：
											</div>
										</td>
										<td colspan="3">
											<input type="text" name="businessRequest.name"
												value="${businessRequest.name}" size="110" dataType="Require" msg="必填">
										</td>
									</tr>
									<tr>
										<td bgcolor="D6E3FA">
											<div align="right" class="STYLE2">
												<font color="red">*</font>发 起 人：
											</div>
										</td>
										<td width="286">
										    <select name="startPersonObj" style="width:160px" id="startPersonId" dataType="Require" msg="必选">
												<option value="${businessRequest.startPerson.id}">${businessRequest.startPerson.name}</option>
											</select>
											<button type="button" onclick="selectMainPerson('startPersonId')" style="margin-left: 5px">选择人员</button>
	
										</td>
										<td bgcolor="D6E3FA" width="140">
											<div align="right" class="STYLE2">
												发起部门：
											</div>
										</td>
										<td width="268">
											<input type="text" name="startDept"
												value="${businessRequest.startDept.fullName}"
												class="input_nob" size="40" readonly>
											<input type="hidden" name="startDeptObj"
												value="${startDept.id}">
										</td>
									</tr>
	
									<tr>
										<td bgcolor="D6E3FA" width="140">
											<div align="right" class="STYLE2">
												<font color="red">*</font>产品经理：
											</div>
										</td>
										<td width="268">
												
											<select name="prodPerson" style="width:160px;" id="prodPersonId" dataType="Require" msg="必选">
												<option value="${businessRequest.prodPerson.id}">${businessRequest.prodPerson.name}</option>
												<s:iterator value="#request.prodList">
													<option value="${id }">${name }</option>	
												</s:iterator>
											</select>
											<%-- 
											<button type="button" onclick="selectMainPerson('prodPersonId')" style="margin-left: 5px">选择人员</button>
											--%>
										</td>
										<td bgcolor="D6E3FA">
											<div align="right" class="STYLE2">
												产品部门：
											</div>
										</td>
										<td>
											<input type="text" name="prodDept"
												value="${businessRequest.prodDept.fullName}" class="input_nob"
												size="40" readonly>
											<input type="hidden" name="prodDeptObj"
												value="${businessRequest.prodDept.id}">
										</td>
									</tr>
									<tr>
										<td bgcolor="D6E3FA">
											<div align="right" class="STYLE2">
												需求类别：
											</div>
										</td>
										<td>
											<s:select name="typeId" list="types"
												listKey="name" listValue="name" theme="css_xhtml" />
										</td>
										<td bgcolor="D6E3FA" width="140">
											<div align="right" class="STYLE2">
												重要性：
											</div>
										</td>
										<td width="268">
											<s:select name="importanceId"
												list="importances" listKey="name" listValue="name"
												theme="css_xhtml" />
										</td>
									</tr>
									<tr>
										<td bgcolor="D6E3FA">
											<div align="right" class="STYLE2">
												<font color="red">*</font>优化内容：
											</div>
										</td>
										<td colspan="3">
											<textarea name="content" style="width: 95%;height: 80px" dataType="Require" msg="必填">${businessRequest.content}</textarea>
										</td>
									</tr>
								</table>
								</div>
								<div id="newReqId"></div>
							</td>
						</tr>
						<tr>
							<td height="5">
								<table width="100%" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="5" height="5"><img src="<s:url value="/images/cphdzx_tab3.gif"/>" width="5" height="5" /></td>
										<td class="tdborderbottom"><img src="<s:url value="/images/spacer.gif"/>" width="1" height="1" /></td>
										<td width="5"><img src="<s:url value="/images/cphdzx_tab4.gif"/>" width="5" height="5" /></td>
									</tr>
								</table>
							</td>
						</tr>
					</table>
</s:form>			
</body>
</html>